package com.aiit.ssm.model;

import javax.validation.constraints.Pattern;

public class Employee {
	private int id;
	@Pattern(regexp="^[a-zA-Z \\u4E00-\\u9FA5]{2,10}$",message="姓名必须由2~10位大小写英文字母、空格、中文组成")
	private String name;
	private String gender;//性别
	@Pattern(regexp="^([a-z0-9_\\.-]+)@([\\da-z\\.-]+)\\.([a-z\\.]{2,6})$",message="邮箱不符合格式")
	private String email;
	private Department dept;
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getGender() {
		return gender;
	}
	public void setGender(String gender) {
		this.gender = gender;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public Department getDept() {
		return dept;
	}
	public void setDept(Department dept) {
		this.dept = dept;
	}
	public Employee(int id, String name, String gender, String email, Department dept) {
		super();
		this.id = id;
		this.name = name;
		this.gender = gender;
		this.email = email;
		this.dept = dept;
	}
	public Employee(String name, String gender, String email, Department dept) {
		super();
		this.name = name;
		this.gender = gender;
		this.email = email;
		this.dept = dept;
	}
	public Employee() {
		
	}
	
	@Override
	public String toString() {
		return "Employee [id=" + id + ", name=" + name + ", gender=" + gender + ", email=" + email + ", dept=" + dept
				+ "]";
	}
	
  
	

}
